﻿using System;
using System.Collections.Generic;
using NUnit.Framework;
using Lottery.App.DAL;
using Lottery.App.Model;

namespace Lottery.App.Test
{
    [TestFixture]
    public class Helper
    {
        [Test]
        public void InitN2()
        {
            N2Dao dao = new N2Dao();

            List<string> list = Utils.Get11P2();

            dao.BeginTransaction();
            foreach (string item in list)
            {
                dao.Save(new N2Info { Value = item });
            }
            dao.CommitTransaction();
        }

        [Test]
        public void InitN3()
        {
            N3Dao dao = new N3Dao();

            List<string> list = Utils.Get11P3();

            dao.BeginTransaction();
            foreach (string item in list)
            {
                dao.Save(new N3Info { Value = item });
            }
            dao.CommitTransaction();
        }

        [Test]
        public void InitN4()
        {
            N4Dao dao = new N4Dao();

            List<string> list = Utils.Get11P4();

            dao.BeginTransaction();
            foreach (string item in list)
            {
                dao.Save(new N4Info { Value = item });
            }
            dao.CommitTransaction();
        }

        [Test]
        public void InitN5()
        {
            N5Dao dao = new N5Dao();

            List<string> list = Utils.Get11P5();

            dao.BeginTransaction();
            foreach (string item in list)
            {
                dao.Save(new N5Info { Value = item });
            }
            dao.CommitTransaction();
        }

        [Test]
        public void InitN6()
        {
            N6Dao dao = new N6Dao();

            List<string> list = Utils.Get11P6();

            dao.BeginTransaction();
            foreach (string item in list)
            {
                dao.Save(new N6Info { Value = item });
            }
            dao.CommitTransaction();
        }

        [Test]
        public void InitN7()
        {
            N7Dao dao = new N7Dao();

            List<string> list = Utils.Get11P7();

            dao.BeginTransaction();
            foreach (string item in list)
            {
                dao.Save(new N7Info { Value = item });
            }
            dao.CommitTransaction();
        }

        [Test]
        public void InitN8()
        {
            N8Dao dao = new N8Dao();

            List<string> list = Utils.Get11P8();

            dao.BeginTransaction();
            foreach (string item in list)
            {
                dao.Save(new N8Info { Value = item });
            }
            dao.CommitTransaction();
        }

        [Test]
        public void InitA1()
        {
            A1Dao dao = new A1Dao();

            List<string> list = Utils.Get11P1();

            dao.BeginTransaction();
            foreach (string item in list)
            {
                dao.Save(new A1Info() { Value = item });
            }
            dao.CommitTransaction();
        }

        [Test]
        public void InitA2()
        {
            A2Dao dao = new A2Dao();

            List<string> list = Utils.Get11A2();

            dao.BeginTransaction();
            foreach (string item in list)
            {
                dao.Save(new A2Info() { Value = item });
            }
            dao.CommitTransaction();
        }

        [Test]
        public void InitA3()
        {
            A3Dao dao = new A3Dao();

            List<string> list = Utils.Get11A3();

            dao.BeginTransaction();
            foreach (string item in list)
            {
                dao.Save(new A3Info() { Value = item });
            }
            dao.CommitTransaction();
        }

        [Test]
        public void InitP2()
        {
            P2Dao dao = new P2Dao();

            List<string> list = Utils.Get11P2();

            dao.BeginTransaction();
            foreach (string item in list)
            {
                dao.Save(new P2Info() { Value = item });
            }
            dao.CommitTransaction();
        }

        [Test]
        public void InitP3()
        {
            P3Dao dao = new P3Dao();

            List<string> list = Utils.Get11P3();

            dao.BeginTransaction();
            foreach (string item in list)
            {
                dao.Save(new P3Info() { Value = item });
            }
            dao.CommitTransaction();
        }

    }
}
